﻿using CNKI.TPI.Web.Search.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CNKI.TPI.Web.Admin.IDAO
{
   public interface ISubmitDAO
    {

       /// <summary>
        /// 保存提交设置信息
        /// </summary>
        /// <returns></returns>
       bool InsertOption(SYS_CMS_OPTION obj);
       /// <summary>
        /// 删除SYS_CMS_OPTION表对应标识位的数据
        /// </summary>
        /// <param name="flage"></param>
        /// <returns></returns>
       bool DeleteOption(int flage);

         /// <summary>
        /// 删除_MetaData表对应的数据
        /// </summary>
        /// <param name="flage"></param>
        /// <returns></returns>
       bool DeleteMetaData(string dbcode, int sysid);
          /// <summary>
        /// 删除_MetaDataFile表对应的数据
        /// </summary>
        /// <param name="flage"></param>
        /// <returns></returns>
       bool DeleteMetaDataFile(string dbcode, int sysid);
         /// <summary>
        /// 删除_MetaDataRef表对应的数据
        /// </summary>
        /// <param name="flage"></param>
        /// <returns></returns>
       bool DeleteMetaDataRef(string dbcode, int sysid);
         /// <summary>
        /// 获取不合格因素
        /// </summary>
        /// <param name="flage"></param>
        /// <returns></returns>
        IList<SYS_CMS_ERRORINFOCONFIG> GetErrorInfo();
         /// <summary>
        /// 插入不合格因素
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        bool InsertErrorInfo(SYS_CMS_ERRORINFOCONFIG obj);
        /// <summary>
        /// 移除不合格因素
        /// </summary>
        /// <param name="sysid"></param>
        /// <returns></returns>
        bool DeleteErrorInfo(int sysid);
       /// <summary>
       /// 修改表数据
       /// </summary>
       /// <param name="sql"></param>
       /// <returns></returns>
        bool UpdateMetaData(string dbcode, string markstate, string errorinfo, string sysid);
        /// <summary>
        /// 删除所有数据
        /// </summary>
        /// <param name="flage"></param>
        /// <returns></returns>
         bool DeleteErrorInfoAll();
        /// <summary>
        /// 获取数字对象使用字段
        /// </summary>
        /// <param name="flage"></param>
        /// <returns></returns>
         IList<SYS_CMS_DATABASE_FIELD> GetNumField(string dbcode);
       /// <summary>
        /// 更新SYS_CMS_DATABASE表的 papertype  PaperFieldValue DatetimeFlag 字段
        /// </summary>
        /// <param name="papertype"></param>
        /// <param name="field"></param>
        /// <param name="timecheck"></param>
        /// <param name="sysid"></param>
        /// <returns></returns>
         bool UpdateCmsDataBase(string papertype, string field, string timecheck, string sysid);
         /// <summary>
         /// 获取设置过提交样式的字段
         /// </summary>
         /// <param name="dbcode"></param>
         /// <param name="type"></param>
         /// <returns></returns>
         IList<SYS_CMS_SUBMIT> IsEditStyle(string dbcode, string type);
        /// <summary>
        /// 保存SYS_CMS_SUBMIT设置信息
        /// </summary>
        /// <returns></returns>
         bool InsertStype(SYS_CMS_SUBMIT obj);
       
        /// <summary>
        /// 删除SYS_CMS_SUBMIT表对应数据库的数据
        /// </summary>
        /// <param name="flage"></param>
        /// <returns></returns>
         bool DeleteStype(string dbcode, string type);
    }
}
